<template>
	<view class="content">
		<up-navbar title="我的推广"
			bgColor="rgba(0,0,0,0)"
			titleStyle="color: #fff"
			leftIconColor="#fff"
			:autoBack="true"
			:fixed="false"></up-navbar>

		<view class="info">
			<view class="money">
				<view>当前收益（元）</view>
				<view>905.99</view>
			</view>

			<view class="money-detail">
				<view>
					<text>昨日收益（元）</text>
					<text>900.09</text>
				</view>
				<view>
					<text>提现中（元）</text>
					<text>900.09</text>
				</view>
				<view>
					<text>累计提现（元）</text>
					<text>805.99</text>
				</view>
			</view>
			<view class="btn">立即提现</view>
		</view>
	</view>


	<view class="title">常用工具</view>

	<view class="tool">
		<view v-for="(item, index) in tool" @click="$path.navigateTo(item.path)">
			<image :src="`/static/tg${index + 1}.png`" mode=""></image>
			<view class="tit">
				<text>{{item.tit}}</text>
				<text>{{item.text}}</text>
			</view>
		</view>
	</view>
</template>

<script setup>
	import { reactive } from 'vue';
	const tool = reactive([{
		tit: '我的邀请',
		text: '邀请好友列表',
		path: './team'
	}, {
		tit: '推广二维码',
		text: '我的专属二维码',
		path: './invite'
	}, {
		tit: '佣金明细',
		text: '我的佣金来源记录',
		path: ''
	}, {
		tit: '提现明细',
		text: '佣金提现明细',
		path: ''
	}])
</script>

<style lang="scss">
	.content {
		width: 750rpx;
		height: 480rpx;
		background-image: linear-gradient(179deg, #FF9E4C 0%, #FF7316 56%, #ffffff 100%);
		position: relative;

		.info {
			position: absolute;
			left: 32rpx;
			top: 152rpx;
			width: 686rpx;
			background-image: linear-gradient(238deg, #f9f9f9cc 0%, #ffffffcc 100%);
			border-radius: 12rpx;
			padding: 32rpx;

			.money {
				font-weight: 500;
				font-size: 24rpx;
				color: #7c7c7c;

				>view:nth-child(2) {
					font-weight: 600;
					font-size: 32rpx;
					color: #333333;
					margin-top: 20rpx;
				}
			}

			.money-detail {
				display: flex;
				justify-content: space-between;
				margin-top: 60rpx;

				>view {
					display: flex;
					flex-direction: column;
					align-items: center;
					font-weight: 500;
					font-size: 24rpx;
					color: #AAAAAA;

					>text:nth-child(2) {
						font-weight: 600;
						font-size: 32rpx;
						color: #333333;
						margin-top: 20rpx;
					}
				}
			}

			.btn {
				width: 400rpx;
				height: 80rpx;
				line-height: 80rpx;
				text-align: center;
				background-image: linear-gradient(90deg, #FF9E4C 0%, #FF7316 100%);
				border-radius: 40rpx;
				margin: 52rpx auto 0;
				font-weight: 600;
				font-size: 28rpx;
				color: #FFFFFF;
			}
		}
	}

	.title {
		font-weight: 600;
		font-size: 36rpx;
		color: #333333;
		margin-top: 160rpx;
		padding: 0 32rpx;
	}

	.tool {
		width: 686rpx;
		margin: 32rpx auto;
		padding: 0 20rpx;
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;

		>view {
			width: 300rpx;
			display: flex;
			align-items: center;
			height: 142rpx;

			image {
				width: 84rpx;
				height: 84rpx;
				margin-right: 20rpx;
			}

			.tit {
				display: flex;
				flex-direction: column;
				font-weight: 600;
				font-size: 28rpx;
				color: #333333;

				>text:nth-child(2) {
					font-weight: 500;
					font-size: 24rpx;
					color: #AAAAAA;
					margin-top: 10rpx;
				}
			}
		}
	}
</style>